<?php

/*
 *  Copyright (C) 2011 Dan de la Cruz <ddcruzg at gmail.com>
 *
 *  MAU is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  MAU is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @author Dan de la Cruz <ddcruzg at gmail.com>
 */

interface IMau {

    // MAU
    public function autenticarUsuario($login,$password);
    public function setModuloARole($modulo_id,$role_id);
    public function setUsuarioARole($usuario_id,$role_id);
    public function setPermisoAModulo($permiso_id,$modulo_id);
    public function deletePermisoDelModulo($permiso_id,$modulo_id);
    public function getModulosDeRole($role);
    public function getRoleDeUsuario($usuario);
    public function getPermisosDelModulo($modulo);
    
    // CRUD para Usuarios
    public function getUsuarios();
    public function getUsuarioById($id);
    public function getUsuarioWhere($filtro);
    public function setNuevoUsuario($usuario);
    public function deleteUsuarioWhere($filtro);
    public function deleteUsuarioById($id);
    public function updateUsuario($usuario);

    // CRUD para Modulos
    public function getModulos();
    public function getModuloById($id);
    public function getModuloWhere($filtro);
    public function setNuevoModulo($grupo);
    public function deleteModuloWhere($filtro);
    public function deleteModuloById($id);
    public function updateModulo($grupo);
    
    // CRUD para Roles
    public function getRoles();
    public function getRoleById($id);
    public function getRoleWhere($filtro);
    public function setNuevoRole($role);
    public function deleteRoleWhere($filtro);
    public function deleteRoleById($id);
    public function updateRole($role);

    // CRUD para Permisos
    public function getPermisos();
    public function getPermisoById($id);
    public function getPermisoWhere($filtro);
    public function setNuevoPermiso($permiso);
    public function deletePermisoWhere($filtro);
    public function deletePermisoById($id);
    public function updatePermiso($permiso);
}

?>
